<?php
/**
 * Created by PhpStorm.
 * User: u
 * Date: 2019/3/26
 * Time: 11:10
 */

namespace common\sources\read\taskshopimage;


use common\models\craftsman\TaskShopImage;

class TaskShopImageAccess implements ITaskShopImageAccess
{
    public function getTaskShop($task_commod_id)
    {
        return TaskShopImage::find()
            ->select("id,bus_id,praise_type,task_commod_id,comment_keyword,slide_img1,slide_img2,slide_img3,slide_img4,slide_img5,colour,size,comment")
            ->where(["task_commod_id" =>$task_commod_id])
            ->asArray()
            ->all();
    }

    public function keyWorkers($id) {
        return TaskShopImage::find()
            ->select("id,comment_keyword,task_commod_id,praise_type,comment_keyword,slide_img1,slide_img2,slide_img3,slide_img4,slide_img5,colour,size,comment,is_effect")
            ->where(["task_commod_id" =>$id])
            ->asArray()
            ->all();
    }

    public function keyWorkersOfId($id) {
        return TaskShopImage::find()
            ->select("id,comment_keyword,task_commod_id,praise_type,comment_keyword,slide_img1,slide_img2,slide_img3,slide_img4,slide_img5,colour,size,comment,is_effect")
            ->where(["id" =>$id])
            ->asArray()
            ->one();
    }
}